import { HintIcon } from "../../uiIconBtn/HintIcon";
import { Language } from "../../../../../extend/language/Language";
import { Alert } from "../../../../../com/mui/controls/Alert";
import { Dispatcher } from "../../../../mvc/core/Dispatcher";
import { DataEvent } from "../../../events/DataEvent";
import { EventName } from "../../../mvc/EventName";
import { EffectManager } from "../../../manager/EffectManager";
import { UIIconEvent } from "../../uiIconBtn/UIIconEvent";
type int = number;
//class GuildPastureHintIcon
    
    export  class GuildPastureHintIcon extends HintIcon
    {
        constructor(arg1: string=null, arg2: Boolean=true)
        {
            super(arg1, arg2);
            return;
        }

        protected /* override */ onHintIconClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            var loc1=Language.getString(90328);
            Alert.okLabel = Language.getString(90329);
            Alert.calcelLabel = Language.getString(90330);
            Alert.buttonWidth = 80;
            Alert.show(loc1, null, Alert.OK | Alert.CANCEL, null, this.onCloseHandler);
            return;
        }

        /* internal  */onCloseHandler(arg1: int): void
        {
            if (arg1 == Alert.OK) 
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.GuildPastureGotoNpc));
                EffectManager.glowFilterUnReg(this);
                if (this.parent && _clickHide) 
                {
                    this.parent.removeChild(this);
                    this.dispatchEvent(new UIIconEvent(UIIconEvent.RemoveIcon));
                }
            }
            return;
        }
    }
